package com.yunwushanhe.student.bean;

import com.yunwushanhe.student.Contants.CodeEnum;
import lombok.Data;

/**
 * 这类是自定义的业务异常类
 */
@Data
public class BizException extends RuntimeException {
    private Integer code;

    public BizException(String msg) {
        super(msg);
    }

    public BizException(CodeEnum codeEnum) {
        super(codeEnum.getMassage());
        this.code = codeEnum.getCode();
    }

}
